import {IReference} from "../ReferencePool/IReference";

export abstract class TaskPoolTaskBase implements IReference{
    set done(value: boolean) {
        this._done = value;
    }
    get serialId(): number {
        return this._serialId;
    }

    get priority(): number {
        return this._priority;
    }

    get done(): boolean {
        return this._done;
    }

    get description():string{
        return null;
    }
    private readonly DefaultPriority:number = 0;
    private _serialId:number;
    private _priority:number;
    private _done:boolean;

    constructor() {
        this._serialId = 0;
        this._priority = this.DefaultPriority;
        this._done = false;

    }

    Initialize(serialId:number,priority:number):void{
        this._serialId = serialId;
        this._priority = priority;
        this._done = false;
    }


    Clear(): void {
        this._serialId = 0;
        this._priority = this.DefaultPriority;
        this._done = false;
    }

}